package org.example.service;

import org.example.domain.ActivityRecord;
import org.example.domain.User;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;

@Transactional
public interface ActivityRecordService {

    Integer updateActivityRecordIsDoByActivityRecordId(Integer activityRecordId);

    ActivityRecord[] getActivityRecordsByActivityId(Integer activityId);

    ActivityRecord[] getActivityRecordsByUserId(Integer userId);

    Integer addActivityRecord(ActivityRecord activityRecord);//用户报名活动，新增一条活动记录

    ArrayList<User> getUsersByActivityId(Integer activityId);//根据活动的id，获取参加此项活动的人员信息

    void deleteActivityRecordById(Integer id,Integer activityId);//用户取消活动的报名,同时释放报名余额

    Integer deleteActivityRecordByUserIdAndActivityId(Integer userId,Integer activityId);//管理员取消报名（未签到都可以取消）
    // ,并且释放报名余额
}
